package com.laihui.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;

import com.laihui.activity.R;
import com.laihui.model.NewDetail;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;
import com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter;

/**
 * Created by ST on 2017/7/25.
 */

public class ActivityListAdapter extends RecyclerArrayAdapter<NewDetail.ListBean>{
    public ActivityListAdapter(Context context) {
        super(context);
    }

    @Override
    public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
        return new ActivityListViewHolder(parent);
    }

    class ActivityListViewHolder extends BaseViewHolder<NewDetail.ListBean> {
        TextView tv_name;

        public ActivityListViewHolder(ViewGroup parent) {
            super(parent, R.layout.item_activity);
             tv_name = $(R.id.tv_name);
//            tv_money = $(R.id.tv_money);
//            tv_tender_time = $(R.id.tv_tender_time);
//            time_detail = $(R.id.time_detail);
        }

        @Override
        public void setData(NewDetail.ListBean data) {
            tv_name.setText(data.getActivity_name());
//            tv_mobile.setText(StringUtils.isEmpty(data.getMobile())?"暂未填写":data.getMobile());
//            tv_money.setText(data.getAccount()+"");
//            tv_tender_time.setText(YXDate.TimeStamp2DateTimeYear(data.getAddtime()));
//            time_detail.setText(YXDate.TimeStamp2DateTimeTime(data.getAddtime()));
            super.setData(data);

        }
    }

}
